<template>
	<view class="mykehu">
		<myNav>
			<view slot="left" @click="back"><uni-icons type="closeempty" color="#fff"></uni-icons></view>
			<view class="center">我的客户</view>
		</myNav>

		<view class="center">
			<view class="center-list">姓名:张三</view>
			<view class="center-list">电话：130123456789</view>

			<view class="center-list">
				<view class="left bew">
					<text>用户标签:三口之家；初次购房</text>
					<view class="sss">
						<view class="ca">必买</view>
						<view class="ca">必问</view>
					</view>
				</view>
			</view>
		</view>
		<uni-segmented-control class="myfuck" :current="current" :values="items" @clickItem="onClickItem" style-type="text" active-color="#0099CC"></uni-segmented-control>
		<view class="content1">
			<view v-show="current === 0" class="genjin">
				<view class="title">客户服务日志</view>
				<view class="list-item">客户开始时间: 2020-01-01 21:00</view>
				<view class="list-item">开始审核时间: 2020-02-01 21:00 (审核中)</view>
				<view class="list-item">跟进时间: 2020-02-02 18:00 电话来访</view>
				<view class="list-item">跟进时间: 2020-02-03 18:00 到访</view>
				<view class="list-item">跟进时间: 2020-02-09 18:00 微信联系</view>
				<view class="list-item">跟进时间: 2020-02-10 18:00 到访</view>
				<view class="list-item">跟进时间: 2020-02-15 18:00 微信联系</view>
				<view class="list-item">跟进时间: 2020-02-29 18:00 签约完成</view>
				<view class="list-item"></view>
			
			</view>
			<view class="bottomxxx">
				<view class="left" @click="gotowanshan">完善资料</view>
				<view class="right" @click="xinzheng">新增跟进</view>
			</view>
			<view v-show="current === 1" class="genjin">
				<view class="jiajian">
					<view class="left">未成交意向</view>
					<view class="right">
						<image class="jia" src="../../static/all/wodekehu/add1.png" mode=""></image>
						<image class="jian" src="../../static/all/wodekehu/jian.png" mode=""></image>
					</view>
				</view>
				<view class="title">测试楼盘-一期</view>
				<view class="title" v-for="(item, index) in 5" :key="index" style="background-color: #FFFFFF;color: #000000;">测试楼盘-二期</view>
				<view class="jiajian">
					<view class="left">已成交意向</view>
					<view class="right">
						<image class="jia" src="../../static/all/wodekehu/add1.png" mode=""></image>
						<image class="jian" src="../../static/all/wodekehu/jian.png" mode=""></image>
					</view>
				</view>
				<view class="title">测试楼盘-一期</view>
				<view class="title" v-for="(item, index) in 5" :key="index" style="background-color: #FFFFFF;color: #000000;">测试楼盘-二期</view>
			
			</view>
			<view v-show="current === 2" class="genjin">
				<view class="ziliao">
					<view class="title1">客户意向</view>
					<view class="list-item">客户来源: 来电</view>
					<view class="list-item">认知途径: 网络</view>
					<view class="list-item">购房用途: 投资+自住</view>
					<view class="list-item">关注因素: 投资回报,物业管理,价格,景观,教育,装修标准</view>
					<view class="list-item">意向房型: 两房</view>
					<view class="list-item">意向面积: 60到90平米</view>
					<image src="../../static/all/dengji/zhankai.png" class="fudong" mode=""></image>
				</view>
				<view class="ziliao">
					<view class="title1">客户特征</view>
					<view class="list-item">年龄段: 35-40岁</view>
					<view class="list-item">居住区域: 太子庙</view>
					<view class="list-item">工作区域: 太子庙</view>
					<view class="list-item">所属行业: 保险</view>
					<view class="list-item">家庭结构: 三口之家</view>
					<view class="list-item">本地户籍: 否</view>
					<view class="list-item">购房资格: 有</view>
					<image src="../../static/all/dengji/zhankai.png" class="fudong" mode=""></image>
				</view>
			
			</view>
		<view v-show="current === 3" class="genjin">
			<view class="ziliao">
				<view class="title1">转介路径</view>
				<view class="list-item">2020-03-01 09：10</view>
				<view class="list-item">新增，案场 经济人1（130123456789）新增
  </view>
				<view class="list-item"> </view>
				<view class="list-item"> </view>
				<view class="list-item">2020-03-10 19：10 </view>
				<view class="list-item">修改，案场 经济人1（130123456789）跟进</view>
				
			</view>

		</view>
		</view>
	</view>
</template>

<script>
import { mapMutations } from 'vuex';
import Prompt from '@/components/zz-prompt/index.vue';
import myNav from '../../components/mynav/mynav.vue';
import { searchedVistor } from '@/api/index.js';
import { MyShow } from '@/util/my.js';
export default {
	components: { myNav, Prompt },
	data() {
		return {
			para: '',
			items: ['跟进记录', '购房意向', '资料信息', '转介路径'],
			current: 0
		};
	},
	methods: {
		...mapMutations(['back']),
		onClickItem(e) {
			this.current = e.currentIndex;
			console.log(this.current);
		},
		xinzheng(){
			uni.navigateTo({
				url:"./p18"
			})
		},
		async searchedVistor() {
			//去请求接口
			//  todo 字段自己填充吧
			// console.log('去请求接口');
			try {
				let reslut = await searchedVistor({
					para: this.para
				});
				//成功
				new MyShow('需要渲染的字段').tixing();
			} catch (e) {
				//TODO handle the exception
				new MyShow('需要渲染的字段').tixing();
			}
		},
		
		gotowanshan(){
			uni.navigateTo({
				url:"./p19"
			})
		},
		gotoinfo(val) {}
	}
};
</script>

<style lang="scss">
@import './main.scss';
.myright {
	display: flex;
	flex-direction: column;
	image {
		width: 20px;
		height: 20px;
	}
	margin-top: 40px;
	align-items: center;
	color: #ffffff;
	text {
		margin-top: 5px;
	}
}
</style>
